home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
keyb
/
pkii_112.zip
/
ANSI.DOC
next >
Wrap
Text File
|
1989-03-04
|
27KB
|
490 lines
ANSI.MOD Documentation
January 1989
Version 1.12
Copyright 1988 by John H. Brooks.
All rights reserved.
Permission is granted to quote or
distribute copies of this documentation separately,
and the entire, unaltered POWERKIT II package.
DISCLAIMER: This software is sold "as is." No warranty is given, either
express or implied, that any specific POWERKIT feature will work on any
particular machine. The manufacturer will not be liable for any damage
caused by the use of POWERKIT.
The names of hardware and software products, and companies mentioned in
this document are trademarks or service marks of the respective companies.
FORWARD: Welcome, let me tell you what this ANSI.MOD documentation does NOT
contain. Although ANSI.MOD supports most of the ANSI X3.64 and VT100
"escape" sequences, not all of them will be described here. Just remember
that ANSI.MOD will do the job for you, should you have an application pro-
gram that requires VT100 emulation, or ANSI.SYS be loaded. Also, ANSI.MOD
has many helpful routines that can be used by other programs, and these
will not be mentioned here either. Instead, for those of you who might
wish to write your own "module", or to delve into the esoteric mysteries of
ANSI "escape" sequences, there is a technical reference manual available to
all registered users of POWERKIT II.
I have placed the "module" format for executable TSR (and device driver,
ANSI.MOD is the console device driver *) files in the public domain, and
any software developer, commercial or shareware, may use it, free of royal-
ties. You may also take advantage of ANSI.MOD's superior routines in your
programs. There are some restrictions, and you MUST contact me for
approval, and for the specifics of this offer.
WHAT IS ANSI.MOD? ANSI.MOD performs three major tasks (the keystroke buffer,
with view-port, is a separate program). First, it is a replacement for
the rather inadequate MS/PC-DOS console that controls your screen and
keyboard. The DOS console's inadequacies are the reason every major
application package handles its own I/O to/from the screen and key-
board. Since each program handles this I/O a bit differently, you can
* - For you "techies", ANSI.MOD (when active, and it's simple to turn it on and
off) is the highest "CON" link in the device driver chain, is carried in
the "list of lists" as the console driver, takes over INT 29h duties, and
is the "file" that answers to "handles" 0, 1, and 2.
Page 2
blame the poorly designed DOS console for the fact that some of your
favorite pop-up TSR's (terminate, but stay resident programs) don't
work inside some of your applications, and why some TSR's don't work
very well with other TSR's. Thus, a major goal of the POWERKIT II
design is, at least, to get a special class of TSR's, called "modules",
to COEXIST amicably. To this end, ANSI.MOD provides a set of keyboard
handling and screen updating routines, that are quite simply the best
in the business. ANSI.MOD can replace an entire 80x25 screen, 40 times
a second, on a standard 4.77 Mhz PC.
Second, ANSI.MOD is a replacement for the equally laughable ANSI.SYS
that came in your DOS package. It has a far larger set of the ANSI
X3.64 and VT100 escape sequences, plus a few that ANSI never heard of.
The commands represented by the escape sequences work under much more
diverse conditions than do the corresponding ANSI.SYS commands, and in
many instances, the same command does many more things than its ANSI-
.SYS counterpart.
To cite an example, the old ANSI "keyboard redefine" sequence did
indeed replace one character by one or more other characters, giving
ANSI.SYS a "MACRO" capability, sort of. But, the key redefinition
acted ONLY at the DOS prompt (well OK, in DEBUG and EDLIN too). When
you entered an application, the key reverted to its former self. ANSI-
.MOD produces true MACROS that are available at the touch of a key, all
the time.
Furthermore, you can attach a comment or description to each of your
MACROS, to remind you of some important fact about them. There is a
way provided to show this comment, and also a means to move this MACRO
to a different key (you'll see why later).
Another feature unique to ANSI.MOD's MACROS is that ANSI escape
sequences can be embedded in them. Thus, MACROS can be used to com-
mand your communications port (dial the phone, for example), or
printer, or even to define (or delete!!, even themselves) other MACROS.
Finally, MACROS can be defined at any time, because ANSI.MOD pro-
vides "hot" key access to the ANSI sequence parser, replacing "PROMPT
$e [" (ALT-ESC is the default, and FYI, all hot keys for POWERKIT II
modules are just special types of MACROS, the help screens for the mod-
ules are the above-mentioned comments, and the hot key can be moved
just like any other MACRO). The old, unhandy "PROMPT $e [ ... " method
is still available for batch file use, etc.
Oops, I almost forgot, an ANSI.MOD MACRO can contain sub-macros
(to 10 levels deep), and these are expanded when the outer MACRO is
being called, not when the outer MACRO is being defined. This not
only saves space in the MACRO buffer, but the sub-macro(s) can be
ALTERED between calls to the outer MACRO. I'm sure you will discover
many uses for this sophisticated capability.
Speaking of space, ANSI.MOD MACROS use only a single byte for most key-
strokes, except "extended" ASCII codes (these are two byte codes whose
first byte is 0, or E0h). "Problem" codes (such as control codes) are
handled in software. This results in a significantly larger program,
but the reward is, ANSI's buffer will hold almost twice as much inform-
ation, in the same space, as some other "KEY" or "ANSI type" programs.
Page 3
This brings us to a second important goal of POWERKIT II, STANDARD-
IZATION!!!. All good word processors, spreadsheets, data "basers",
provide many of the same helpful operations, like SEARCH, REPLACE,
COPY, MOVE, DELETE, to name a few. The only trouble is, they each use
different keystrokes to accomplish these tasks, and YOU have to REMEM-
BER which keystroke combination goes with which program. NO MORE, just
create a batch file for each of your programs. The batch file will
create MACROS that move these operations to the same keys in all the
programs -- call the program -- then "uncreate" the MACROS (yep, I
forgot that too, you can delete MACROS) after exiting the program.
Lastly, ANSI.MOD is the traffic cop that mediates potential conflicts
between POWERKIT II modules, recognizes hot keys and calls the associ-
ated module, disables one when another pops up on top of it (to 4 lev-
els deep), interprets their "command" keys for them and calls the
proper routine, sends them keystrokes when asked, pops up their help
screens when F1 is pressed, provides many other useful routines (PKII-
.MOD is several hundred bytes smaller because of these routines).
Now for perhaps THE most AMAZING fact about ANSI.MOD. In its smallest
configuration, with a 256 byte MACRO / ANSI sequence buffer, ANSI.MOD